import { BrowserWindow } from 'electron'

// 窗口操作
function window_operate(event, name) {
    const webContents = event.sender
    const win = BrowserWindow.fromWebContents(webContents)
    switch(name) {
        case 'close':
            win.close()
        case 'min':
            win.minimize()
            break
        case 'max':
            win.maximize()
            break
        case 'unmax':
            win.unmaximize()
            break
    }
}


export {
    window_operate
}